package com.example.demo.mapper;

import com.example.demo.po.Teacher;
import com.example.demo.po.User;
import com.example.demo.po.dto.TeacherAddParam;
import com.example.demo.po.dto.TeacherParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface TeacherMap {


    void SaveTeacher(TeacherParam teacher);

    void SaveTeacherByAdd(TeacherAddParam teacher);

    int GetTeacherUserId(int id);

    String GetNameByUserId(int userid);

    List<Teacher> GetTeacherList();

    void UpdateTeacher(TeacherParam teacher);

    void DeleteTeacher(int id);

    List<Teacher> GetTeacherByName(String name);

    List<Teacher> GetTeacherByNameAndId(@Param("name") String name, @Param("id")int id);

    List<Teacher> GetTeacherById(int id);

    void DeleteByUserId(int id);

    TeacherParam GetTeacherByUserId(int userid);
}
